﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>鼠标经过时自动选择文本</title>
    <style>
        <!--
        form {
            padding: 0px;
            margin: 0px;
            font: 14px Arial;
            background: #3399FF;
        }

        input.txt {
            border: 1px inset #00008B;
            background-color: #ADD8E6;
        }

        input.btn {
            color: #00008B;
            background-color: #ADD8E6;
            border: 1px outset #00008B;
            padding: 1px 2px 1px 2px;
        }
        -->
    </style>
</head>
<body>
    <form method="post" name="myForm1" action="addInfo.aspx">
        <p>
            <label for="name">请输入您的姓名:</label>
            <input type="text" name="name" id="name" class="txt" value="姓名" onmouseover="this.focus()" onfocus="this.select()">
        </p>
        <p>
            <label for="passwd">请输入您的密码:</label>
            <input type="password" name="passwd" id="passwd" class="txt">
        </p>
        <p>
            <input type="submit" name="btnSubmit" id="btnSubmit" value="提交" class="btn">
            <input type="reset" name="btnReset" id="btnReset" value="重置" class="btn">
        </p>
    </form>
</body>
</html>